package string;

import java.util.Scanner;

public class ReplaceAllDemo {
    public static void main(String[] args) {
//        String str = "aaa2bbb4fff9eee";
//        String s = str.replaceAll("\\d",",");
//        System.out.println(s);

        /*
        替换用户输入信息中的敏感词
         */
        Scanner scan = new Scanner(System.in);
        System.out.println("输入信息");
        String str = scan.nextLine();
        String s = str.replaceAll("我[去草艹]","XXX");
        System.out.println(s);


    }
}
